<!doctype html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link href="../css/mui.min.css" rel="stylesheet" />
		<link rel="stylesheet" type="text/css" href="../css/app.css" />
		<link rel="stylesheet" type="text/css" href="../css/mine.css" />
		<link rel="stylesheet" type="text/css" href="css/share.css" />
		<style>

		</style>
	</head>

	<body>
		<div class="mui-content">
			<div class="title">
				<div class="header">
					<img src="../images/setting-man@3x.png" />
					<span><label>登录</label> <font class="mui-icon mui-icon-forward"></font> </span>
					
				</div>
				<!--<div class="bg"></div>-->
			</div>
			<div class="btn">
				<p>注册成为火速购会员</p>
				<button type="button" class="mui-btn mui-btn-yellow mui-btn-block">提成会员等级</button>
			</div>
			<div class="line"></div>
			<ul class="mui-table-view mui-grid-view mui-grid-9">
				<li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-4">
					<img src="../template/home/mine1.png" class="mui-icon" />
					<div class="mui-media-body">全部订单</div>
				</li>
				<li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-4">
					<img src="../template/home/mine2.png" class="mui-icon" />
					<div class="mui-media-body">我的银行卡</div>
				</li>
				<li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-4">
					<img src="../template/home/mine3.png" class="mui-icon" />
					<div class="mui-media-body">我的收货地址</div>
				</li>
				<li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-4">
					<img src="../template/home/mine4.png" class="mui-icon" />
					<div class="mui-media-body">信用提升</div>
				</li>
				<!--<li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-4">
					<img src="../template/home/mine5.png" class="mui-icon" />
					<div class="mui-media-body">邀请好友</div>

				</li>-->
				<li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-4">
					<img src="../template/home/mine6.png" class="mui-icon" />
					<div class="mui-media-body">帮助中心</div>
				</li>
				<li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-4">
					<img src="../images/mine7.png" class="mui-icon" />
					<div class="mui-media-body">账户设置</div>
				</li>
				<li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-4">
					<img src="../template/home/mine8.png" class="mui-icon" />
					<div class="mui-media-body">专属客服</div>
				</li>
				<li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-4">
					<img src="../template/home/mine9.png" class="mui-icon" />
					<div class="mui-media-body">交易市场</div>
				</li>
			</ul>

		</div>
		<div class="accurateQuotation mui-popover mui-popover-action mui-popover-bottom" id="PopoverPicContainer">
			<div class="float-title">
				<span>分享到</span>
			</div>
			<div class="car-choose">
				<ul class="share">
					<li onclick="" id="fenxiang_wx"><img class="fenxiang_img" src="../images/share-wx.png" />
						<div>微信</div>
					</li>
					<li onclick=""><img class="fenxiang_img" src="../images/share-wx.png" />
						<div>朋友圈</div>
					</li>
					<!--<li onclick="fenxiang_inbox()"><img class="fenxiang_img" src="img/share-inbox.png" />
						<div>邮件</div>
					</li>
					<li onclick="fenxiang_message()"><img class="fenxiang_img" src="img/share-message.png" />
						<div>短信</div>
					</li>-->
				</ul>
			</div>
			<div class="confirm">
				<a href="#PopoverPicContainer">
					<div class="confirm-border">
						<span>取消</span>
					</div>
				</a>
			</div>
		</div>
		<script type="text/javascript" src="../lib/mui.min.js"></script>
		<script type="text/javascript" src="../lib/share.js" ></script>
		<script type="text/javascript" src="../lib/jquery-1.11.0.js"></script>
		<script type="text/javascript" src="../lib/service.js"></script>

		<script type="text/javascript">
			mui.init()
			//			放在plusready里,否则会报错
			mui.plusReady(function() {
				init()
				updateSerivces()
				plus.navigator.setStatusBarBackground("#FF7234");
				$('.mui-grid-9').on("tap", "li", function() {
					console.log($(this).index())
					if($(this).index() == 0) {
						plus.webview.getLaunchWebview().evalJS('goOrder()')
					}
					if($(this).index() == 1) {
						openurl('../auth/silver.html')
					}
					if($(this).index() == 2) {
						openurl('../auth/address.html')
					}
					//未实现功能
					if($(this).index() == 3) {
						//						openurl('../auth/address.html')
						plus.webview.getLaunchWebview().evalJS('qualification()')
					}
//					if($(this).index() == 4) {
//						//单独分享微信
////						mui('#PopoverPicContainer').popover('toggle');
//												mui.toast("暂未开放")
//						//						return
//						//												openurl('../auth/phone_list.html')
//					}
					if($(this).index() == 4) {
						openurl('../home/help.html')
						//						openurl('../auth/address.html')
					}
					if($(this).index() == 5) {
						//						mui.toast("暂未开放")
						//						return
						//						openurl('../auth/address.html')
						openurl('../home/set.html')
					}
					if($(this).index() == 6) {
						//						mui.toast("暂未开放")
						//						return
						openurl('../auth/servicelist.html')
					}
					if($(this).index() == 7) {
						//						mui.toast("暂未开放")
						//						return
						openurl('../home/gongxiao.html')
					}
				})
				$('.share').on('tap', 'li', function() {
					var name = $(this).children()[1].textContent;
					console.log("当前点击分享" + name);
					switch(name) {
						case '微信':
							var id = 'weixin';
							var ex = 'WXSceneSession';
							shareAction(id, ex);
							break;
						case '朋友圈':
							id = 'weixin';
							ex = 'WXSceneTimeline';
							shareAction(id, ex);
							break;
						case '邮件':
							shareByEmail('');
							break;
						case '短信':
							shareBySMS('');
							break;
						default:
							id = '';
							ex = '';
							break;
					}
				})
			})
			$('.header').bind('tap',function(){
				if($('.header').find('label').html() == '登录'){
					openurl('../landing/login.html')
				}
			})
			function init() {
				console.log(localStorage.getItem('userinfo'))
				if(localStorage.getItem('userinfo') != null) {
					var data = localStorage.getItem('userinfo');
					var userinfo = JSON.parse(data);
					$('.header').find('label').html(userinfo.phone)
					$('.btn p').html("V " + userinfo.level)
				}

			}
			$('.mui-btn-block').bind('tap',function(){
				plus.webview.getLaunchWebview().evalJS('qualification()')
			})
		</script>
	</body>

</html>